<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
		<title></title>
	</head>
	<style>
		*{
			margin: 0;
			padding: 0;
		}
		.box {
			width: 7.5rem;
			height: 5rem;
			background: red;
		}
	</style>
	<body>
		<div class="box">
			1
		</div>	
	</body>
	<script>
		// JavaScript Document
		(function (doc, win) {
		    var docEl = doc.documentElement,
		    resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
		    recalc = function () {
		      var clientWidth = docEl.clientWidth;
		      if (!clientWidth) return;
		        if (clientWidth > 750) {
		            docEl.style.fontSize = '100px';// 修正一下大于750的字体大小为100px
		        } else {
		            docEl.style.fontSize = 100 * (clientWidth / 750) + 'px';
		        }
		      /*
		       * 100 -> html,body {  font-size:100px; }
		       * 750 -> 此处以 iPhone6 两倍设计稿 宽度750px 布局页面
		       * 根据具体状况改变这两个数值
		       */
		    };
		
		  if (!doc.addEventListener) return;
		    win.addEventListener(resizeEvt, recalc, false);
		    doc.addEventListener('DOMContentLoaded', recalc, false);
		})(document, window);
	</script>
</html>
